package com.bolt.report.engine.fill;

import com.bolt.report.definition.CellDefinition;
import com.bolt.report.definition.ElementType;
import com.bolt.report.engine.BindData;
import com.bolt.report.engine.FillElementVisitor;
import com.bolt.report.engine.export.Exporter;
import com.fasterxml.jackson.databind.JsonNode;

public class FillCodeImageElement extends FillImageElement {
    private JsonNode jsonData;

    private ElementType type;
    public FillCodeImageElement(ElementType type, JsonNode jsonData,CellDefinition element, BindData bindData, FillContext fillContext) {
        super(element, bindData, fillContext);
        this.type = type;
        this.jsonData = jsonData;
    }

    public JsonNode getJsonData() {
        return jsonData;
    }

    public ElementType getType() {
        return type;
    }


    @Override
    public <T> void accept(FillElementVisitor<T> visitor, T arg) {
        visitor.visit(this, arg);
    }

    @Override
    public <E extends Exporter> void accept(ExporterVisitor<E> visitor, E exporter)  {
        visitor.visit(this,exporter);
    }

}